import request from '@/utils/request'

// 查询积分兑换商品配置列表
export function listExchanges(query) {
  return request({
    url: '/core/exchanges/list',
    method: 'get',
    params: query
  })
}

// 查询积分兑换商品配置详细
export function getExchanges(id) {
  return request({
    url: '/core/exchanges/' + id,
    method: 'get'
  })
}

// 新增积分兑换商品配置
export function addExchanges(data) {
  return request({
    url: '/core/exchanges',
    method: 'post',
    data: data
  })
}

// 修改积分兑换商品配置
export function updateExchanges(data) {
  return request({
    url: '/core/exchanges',
    method: 'put',
    data: data
  })
}

// 删除积分兑换商品配置
export function delExchanges(id) {
  return request({
    url: '/core/exchanges/' + id,
    method: 'delete'
  })
}
